Tim Deegan [Wed, 11 Apr 2012 12:10:33 +0000 (13:10 +0100)]
x86: don't use .subsection when compiling with clang
LLVM's assembler doesn't support the .subsection directive, so put
the out-of-line failure path in .fixup instead.
Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
Tim Deegan [Wed, 11 Apr 2012 12:10:33 +0000 (13:10 +0100)]
x86: fix memset(ptr, 0, sizeof ptr).
Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Christoph Egger <Christoph.Egger@amd.com>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
Tim Deegan [Wed, 11 Apr 2012 12:10:33 +0000 (13:10 +0100)]
x86: fix logical ANDs used to mask bitfields.
Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
Tim Deegan [Wed, 11 Apr 2012 12:10:33 +0000 (13:10 +0100)]
x86/mm: Another couple of comparisons of unsigned vars with < 0.
Adding the explicit (unsigned) casts in case enums ever end up signed.
Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
Tim Deegan [Wed, 11 Apr 2012 12:10:33 +0000 (13:10 +0100)]
xen: Add -Wno-unused-value to the clang CFLAGS
clang complains about a lot of functions and macros whose return value
is unused. I started on patches to drop some functions' return values
and scatter (void)s around callers, but it was getting too messy.
Just turn off the warning instead.
Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
George Dunlap [Tue, 10 Apr 2012 09:42:35 +0000 (10:42 +0100)]
xen, cpupools: Fix cpupool-move to make more consistent
The full order for creating new private data structures when moving
from one pool to another is now:
* Allocate all new structures
- Allocate a new private domain structure (but don't point there yet)
- Allocate per-vcpu data structures (but don't point there yet)
* Remove old structures
- Remove each vcpu, freeing the associated data structure
- Free the domain data structure
* Switch to the new structures
- Set the domain to the new cpupool, with the new private domain
structure
- Set each vcpu to the respective new structure, and insert
This is in line with a (fairly reasonable) assumption in credit2 that
the private structure of the domain will be the private structure
pointed to by the per-vcpu private structure.
Also fix a bug, in which insert_vcpu was called with the *old* vcpu
ops rather than the new ones.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
George Dunlap [Tue, 10 Apr 2012 09:41:55 +0000 (10:41 +0100)]
xen, credit2: Put the per-cpu schedule lock back to the default lock when releasing cpu
This fixes a bug that happens when you remove cpus from a credit2
cpupool.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
George Dunlap [Tue, 10 Apr 2012 09:41:30 +0000 (10:41 +0100)]
xen: Fix schedule()'s grabbing of the schedule lock
Because the location of the lock can change between the time you read
it and the time you grab it, the per-cpu schedule locks need to check
after lock acquisition that the lock location hasn't changed, and
release and re-try if so. This change was effected throughout the
source code, but one very important place was apparently missed: in
schedule() itself.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
Andres Lagar-Cavilla [Thu, 5 Apr 2012 10:06:03 +0000 (11:06 +0100)]
x86/mm: Take care of domain reference for shared pages
Making a page sharable removes it from the previous owner's list. Making it
private adds it. These actions are similar to freeing or allocating a page.
Except that they were not minding the domain reference that is taken/dropped
when the first/last page is allocated/freed.
Without fixing this, a domain might remain zombie when destroyed if all its
pages are shared.
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
Olaf Hering [Tue, 3 Apr 2012 15:22:59 +0000 (17:22 +0200)]
domctl.h: document non-standard error codes for enabling paging/access
The domctl to enable paging and access returns some non-standard error
codes after failure. This can be used in the tools to print specific
error messages. xenpaging recognizes these errno values and shows them
if the init function fails.
Document the return codes in the public header file.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
Olaf Hering [Fri, 30 Mar 2012 15:09:07 +0000 (17:09 +0200)]
xenpaging: add error code to indicate iommem passthrough
Similar to the existing ENODEV and EXDEV error codes, add EMDEV to
indicate that iommu passthrough is not compatible with paging.
All error codes are just made-up return codes to give proper error
messages in the pager.
Also update the HAP related error message now that paging is enabled
also on AMD hosts.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Jackson <Ian.Jackson@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
Roger Pau Monne [Wed, 22 Feb 2012 16:37:50 +0000 (17:37 +0100)]
autoconf: check for as86, ld86, bcc and iasl
Check for this tools, and set the proper paths on config/Tool.mk.
Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Wed, 4 Apr 2012 15:10:18 +0000 (16:10 +0100)]
libxl: fixup error handling in libxl_send_trigger
xc_domain_send_trigger returns -1 and sets errno on failure so use
LIBXL__LOG_ERRNO not LIBXL__LOG_ERRNOVAL(rc).
Change the default case of the switch to set rc=-1,errno=EINVAL too.
Also we weren't actually returning the error code we'd decided on.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
George Dunlap [Wed, 4 Apr 2012 15:06:42 +0000 (16:06 +0100)]
xl, libxl: Add per-device and global permissive config options for pci passthrough
By default pciback only allows PV guests to write "known safe" values into
PCI config space. But many devices require writes to other areas of config
space in order to operate properly. One way to do that is with the "quirks"
interface, which specifies areas known safe to a particular device; the
other way is to mark a device as "permissive", which tells pciback to allow
all config space writes for that domain and device.
This adds a "permissive" flag to the libxl_pci struct and teaches libxl how
to write the appropriate value into sysfs to enable the permissive feature for
devices being passed through. It also adds the permissive config options either
on a per-device basis, or as a global option in the xl command-line.
Because of the potential stability and security implications of enabling
permissive, the flag is left off by default.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
George Dunlap [Wed, 4 Apr 2012 15:06:42 +0000 (16:06 +0100)]
libxl: Move bdf parsing into libxlu
Config parsing functions do not properly belong in libxl. Move them into
libxlu so that others can use them or not as they see fit.
No functional changes. One side-effect was making public a private libxl
utility function which just set the elements of a structure from the function
arguments passed in.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Matt Wilson [Wed, 4 Apr 2012 10:09:15 +0000 (11:09 +0100)]
PV-GRUB: add support for btrfs
This patch adds btrfs support to the GRUB tree used to build PV-GRUB.
The original patch is from Gentoo:
https://bugs.gentoo.org/show_bug.cgi?id=283637
Signed-off-by: Matt Wilson <msw@amazon.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Matt Wilson [Wed, 4 Apr 2012 10:09:14 +0000 (11:09 +0100)]
PV-GRUB: add support for ext4
This patch adds support for ext4 to the GRUB tree used to build PV-GRUB.
The original patch is taken from the Fedora GRUB package in this commit:
http://pkgs.fedoraproject.org/gitweb/?p=grub.git;a=commitdiff;h=
32bf414af04d377055957167aac7dedec691ef57
Signed-off-by: Matt Wilson <msw@amazon.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Matt Wilson [Wed, 4 Apr 2012 10:09:14 +0000 (11:09 +0100)]
PV-GRUB: Check for errors when applying patches to GRUB
We want to ensure that patches apply cleanly without rejects. Bail if
patch returns a non-zero exit code.
Signed-off-by: Matt Wilson <msw@amazon.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Tue, 3 Apr 2012 17:25:56 +0000 (18:25 +0100)]
QEMU_TAG update
Olaf Hering [Wed, 14 Mar 2012 16:53:56 +0000 (17:53 +0100)]
tools/libfsimage: include Rules.mk first
Move the inclusion of Rules.mk up so that things like CFLAGS get initialized
properly. Currently only zfs appends CFLAGS. If CFLAGS get reset by Rules.mk
the private settings are lost and compilation of zfs support fails.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Olaf Hering [Wed, 14 Mar 2012 16:02:23 +0000 (17:02 +0100)]
tools/blktap: reorder MEMSHR_DIR to fix CFLAGS
In blktap2 MEMSHR_DIR is used before it is set. This removes the
required -D_GNU_SOURCE from CFLAGS, its used as option for -I
Fix this by moving memshr related flags to the place where its actually
used.
The failure is a missing O_DIRECT define.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Anthony PERARD [Tue, 3 Apr 2012 17:15:11 +0000 (18:15 +0100)]
libxl: Pass actual RAM amount to qemu-xen
QEMU upstream need to kown the amount of RAM given to a guest. This patch give
the correct value.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Roger Pau Monne [Tue, 3 Apr 2012 17:02:46 +0000 (18:02 +0100)]
autoconf: change AX_ARG_{DISABLE/ENABLE}_AND_EXPORT to make more sense
Change disable/enable feature macros to have a more significative name
of what they actually do, to avoid confusions.
New macros have the following names:
AX_ARG_DEFAULT_ENABLE: feature is enabled by default, provides the
--disable-{feature} option to disable it.
AX_ARG_DEFAULT_DISABLE: feature is disabled by default, provides the
--enable-{feature] option to enable it.
Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Olaf Hering [Tue, 3 Apr 2012 14:56:53 +0000 (15:56 +0100)]
config/Tools.mk: remove unused IP
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Mon, 19 Mar 2012 15:06:19 +0000 (15:06 +0000)]
libxl: Document API and ABI compatibility guarantees.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Mon, 19 Mar 2012 14:24:01 +0000 (14:24 +0000)]
libxl: log device model arguments to aid debugging
At the moment the only easy way to get at these is to strace xl.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Olaf Hering [Tue, 3 Apr 2012 14:25:01 +0000 (15:25 +0100)]
tools: specify datadir for qemu-xen build to fix firmware loading
qemu-xen does currently not find the firmware files, such as
vgabios-cirrus.bin. The reason is that qemu-xen uses the default prefix
/usr/local. Use SHAREDIR/qemu-xen as directory so that it can coexist
with qemu-traditional which is installed in SHAREDIR/xen/qemu.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Olaf Hering [Tue, 3 Apr 2012 14:12:21 +0000 (15:12 +0100)]
tools/vtpm: use LDLIBS to pass -lgmp
Linking tpmd will fail with recent toolchains because -lgmp is passed
via LDFLAGS instead of LDLIBS. With this change -lgpm is placed at the
end of the gcc cmdline and linking tpmd succeeds again.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
David Vrabel [Tue, 3 Apr 2012 13:40:08 +0000 (14:40 +0100)]
docs: clarify documentation for the the dom0_mem command line option
This addresses Ian C's comments on v1 of a previous patch (which
was applied instead of v2).
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Roger Pau Monne [Tue, 3 Apr 2012 13:28:45 +0000 (14:28 +0100)]
autoconf: fix python-dev detection on old python versions
Replaced the use of python-config (that is only present in Python >= 2.5.x)
with the distutils python module.
Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Cc: Zhang, Yang Z <yang.z.zhang@intel.com>
Tested-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Jan Beulich [Tue, 3 Apr 2012 10:35:35 +0000 (12:35 +0200)]
remove ia64
It retains IA64-specific bits in code imported from elsewhere (e.g.
ACPI, EFI) as well as in the public headers.
It also doesn't touch the tools, mini-os, and unmodified_drivers
sub-trees.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Ian Jackson [Mon, 2 Apr 2012 17:14:31 +0000 (18:14 +0100)]
QEMU_TAG update
Ian Campbell [Thu, 22 Mar 2012 09:02:29 +0000 (09:02 +0000)]
libxl: Use enum values for qemu version not raw numbers
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Konrad Rzeszutek Wilk [Fri, 23 Mar 2012 13:45:56 +0000 (09:45 -0400)]
linux-xencommons: Load xen-acpi-processor
Upstream the "xen/acpi-processor: C and P-state driver that
uploads said data to hypervisor." takes care of uploading power information
information that normally a cpu frequency scaling driver would using
in the initial domain. We want the hypervisor to take that data and
make good usage of it.
Fortunatly for us we do not have to worry about the native cpu frequency
scaling drivers being loaded first, as the upstream commit:
"xen/cpufreq: Disable the cpu frequency scaling drivers from loading."
takes care of that. Meaning we can load the xen-acpi-processor at any time.
By default that driver is built as a module - and since we are
the only user of it - we should load it.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Anthony PERARD [Mon, 2 Apr 2012 16:45:07 +0000 (17:45 +0100)]
docs: Remove qemu-upstream HowTo, and link to the wiki page.
Instead of having twice the same HowTo in tree and in the wiki, the one in tree
will become a link to the wiki.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Dario Faggioli [Mon, 2 Apr 2012 16:43:06 +0000 (17:43 +0100)]
docs: Document vcpu-pinning in guest config file
Chageset
54000bca7a6a didn't affect xl.cfg.pod.5 properly.
Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Olaf Hering [Mon, 26 Mar 2012 13:22:18 +0000 (15:22 +0200)]
tools/libxc: send page-in requests in batches in linux_privcmd_map_foreign_bulk
One of the bottlenecks with foreign page-in request is the poor retry
handling in linux_privcmd_map_foreign_bulk(). It sends one request per
paged gfn at a time and it waits until the gfn is accessible. This
causes long delays in mmap requests from qemu-dm and xc_save.
Instead of sending one request at a time, walk the entire gfn list and
send batches of mmap requests. They will eventually end up in the pager's
request ring (if it has room again), and will fill up this ring so that
in turn the pager can also process page-in in batches.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Mon, 26 Mar 2012 09:07:40 +0000 (10:07 +0100)]
docs: expand docs/INDEX, sort html index by title rather than filename
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Lin Ming [Mon, 2 Apr 2012 16:32:39 +0000 (17:32 +0100)]
libxl: support for "rtc_timeoffset" and "localtime"
Implement "rtc_timeoffset" and "localtime" options compatible as xm.
rtc_timeoffset is the offset between host time and guest time.
localtime means to specify whether the emulted RTC appears as UTC or is
offset by the host.
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Lin Ming <mlin@ss.pku.edu.cn>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
---
docs/man/xl.cfg.pod.5 | 8 ++++++++
tools/libxl/libxl_create.c | 11 +++++++++++
tools/libxl/libxl_dom.c | 3 +++
tools/libxl/libxl_types.idl | 2 ++
tools/libxl/xl_cmdimpl.c | 5 +++++
5 files changed, 29 insertions(+), 0 deletions(-)
George Dunlap [Mon, 2 Apr 2012 16:22:31 +0000 (17:22 +0100)]
libxl: Handle non-ballooned, zero slackmem properly for pci passthru
The e820_sanitize() function in libxl_pci.c expects one of its arguments to
be non-zero; but since a recent changeset, it can typically expect *to be*
zero. Since the zero case is handled properly, just remove the check.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Tue, 27 Mar 2012 12:52:51 +0000 (13:52 +0100)]
xl: do not include xenctrl.h
Toolstacks which use libxl should not need to use libxc.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell [Mon, 2 Apr 2012 16:07:04 +0000 (17:07 +0100)]
xl: provide a command to set the saved configuration for a running domain
Pickup this new configuration on reboot.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Tue, 27 Mar 2012 10:36:54 +0000 (11:36 +0100)]
README: Document optional ocaml dependencies
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Jackson [Mon, 2 Apr 2012 16:02:45 +0000 (17:02 +0100)]
docs: Document some more hypercalls
Some of these could probably do with some review from people who know
what these hypercalls actually do.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
---
xen/include/public/arch-x86/xen.h | 30 ++++++++++++++++++++++++++++++
xen/include/public/arch-x86_64.h | 16 ++++++++++++++++
xen/include/public/platform.h | 4 ++++
3 files changed, 50 insertions(+), 0 deletions(-)
Ian Campbell [Mon, 26 Mar 2012 16:11:13 +0000 (17:11 +0100)]
docs: spelling and typoes in misc/xen-command-line.markdown
Run a spell checker over the doc and fix the typos and spelling it uncovers
(including a few I just added myself).
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Ian Campbell [Mon, 26 Mar 2012 16:09:59 +0000 (17:09 +0100)]
docs: add some missing options to misc/xen-command-line.markdown
These were mostly ones from xen/arch/x86/boot/cmdline.S which are handled early
and therefore do not use the usual infrastructure and so got missed in the
initial trawl.
The document now contains (AFAICT) every still valid option which was
previously documented at:
http://wiki.xen.org/wiki?title=Xen_Hypervisor_Boot_Options&oldid=1379
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Ian Campbell [Mon, 26 Mar 2012 16:09:40 +0000 (17:09 +0100)]
docs: wrap misc/xen-command-line.markdown to 80 columns
Makes it more readable as a text document.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
David Vrabel [Mon, 2 Apr 2012 15:50:44 +0000 (16:50 +0100)]
device tree: print a warning if a node is nested too deep
Since device_tree_for_each_node() is called before printk() works, a
variable is used to switch between using early_printk() and printk().
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
David Vrabel [Mon, 2 Apr 2012 15:50:43 +0000 (16:50 +0100)]
arm: add dom0_mem command line argument
Add a simple dom0_mem command line argument. It's not as flexible as
the x86 equivalent (the 'max' and 'min' prefixes are not supported).
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
David Vrabel [Mon, 2 Apr 2012 15:50:42 +0000 (16:50 +0100)]
arm: use bootargs for the command line
Use the /chosen node's bootargs parameter for the Xen command line.
Parse it early on before the serial console is setup.
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
David Vrabel [Mon, 2 Apr 2012 15:50:42 +0000 (16:50 +0100)]
device tree,arm: supply a flat device tree to dom0
Build a flat device tree for dom0 based on the one supplied to Xen.
The following changes are made:
* In the /chosen node, the xen,dom0-bootargs parameter is renamed to
bootargs.
* In all memory nodes, the reg parameters are adjusted to reflect
the amount of memory dom0 can use. The p2m is updated using this
info.
Support for passing ATAGS to dom0 is removed.
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
[ removed device_tree_dump call -- ijc ]
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Tim Deegan [Mon, 2 Apr 2012 09:54:05 +0000 (10:54 +0100)]
arm: Use HTPIDR to point to per-CPU state
Rather than having the per-VCPU stack contain a pointer to the
per-PCPU state, use the CPU's hypervisor thread ID register for that.
Signed-off-by: Tim Deegan <tim@xen.org>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
[ s/cpuid/id in set_processor_id -- ijc ]
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Tim Deegan [Mon, 2 Apr 2012 09:54:05 +0000 (10:54 +0100)]
arm: missing unlock in GIC error path
Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Tim Deegan [Mon, 2 Apr 2012 09:54:04 +0000 (10:54 +0100)]
arm: remove code that sets current to itself
Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Wei Huang [Fri, 30 Mar 2012 20:05:54 +0000 (21:05 +0100)]
AMD_LWP: add interrupt support for AMD LWP
This patch adds interrupt support for AMD lightweight profiling. It
registers interrupt handler using alloc_direct_apic_vector(). When
notified, SVM reinjects virtual interrupts into guest VM using
guest's virtual local APIC.
Signed-off-by: Wei Huang <wei.huang2@amd.com>
Signed-off-by: Keir Fraser <keir@xen.org>
Committed-by: Keir Fraser <keir@xen.org>
Keir Fraser [Fri, 30 Mar 2012 09:01:15 +0000 (10:01 +0100)]
x86: Unify direct-apic and hiprio irq vector allocations.
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Fri, 30 Mar 2012 08:14:25 +0000 (09:14 +0100)]
x86: Allow direct vectored interrupts to be dynamically allocated.
Use this for Intel's CMCI and thermal interrupts.
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Fri, 30 Mar 2012 07:52:19 +0000 (08:52 +0100)]
Remove single use of fastcall from hypervisor common code.
Signed-off-by: Keir Fraser <keir@xen.org>
Keir Fraser [Fri, 30 Mar 2012 07:50:33 +0000 (08:50 +0100)]
x86: All vectored interrupts go through do_IRQ().
Signed-off-by: Keir Fraser <keir@xen.org>
Tim Deegan [Thu, 29 Mar 2012 15:59:33 +0000 (16:59 +0100)]
x86/mm: allow mem_event ops on AMD processors too.
(Experimental, for now).
Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
Tim Deegan [Thu, 29 Mar 2012 11:08:41 +0000 (12:08 +0100)]
IOMMU: clean up handling of 'foo' and 'no-foo' command-line options
Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
Andres Lagar-Cavilla [Thu, 29 Mar 2012 11:01:33 +0000 (12:01 +0100)]
x86/mm: Make iommu passthrough and mem paging/sharing mutually exclusive
Regardless of table sharing or processor vendor, these features cannot coexist
since iommu's don't expect gfn->mfn mappings to change, and sharing and paging
depend on trapping all accesses.
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
Andres Lagar-Cavilla [Thu, 29 Mar 2012 11:01:33 +0000 (12:01 +0100)]
x86/mm: Teach paging to page table-based p2m
The p2m-pt.c code, used by both shadow and AMD NPT modes, was not aware of
paging types, and the implications those types have on p2m entries. Add support
to the page table-based p2m to understand the paging types. This is a necessary
step towards enabling memory paging on AMD NPT mode, but not yet the full
solution.
Tested not to break neither shadow mode nor "normal" (i.e. no paging) AMD NPT
mode.
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
Tim Deegan [Thu, 29 Mar 2012 10:29:24 +0000 (11:29 +0100)]
x86/mm/p2m-pt: Clip mfn to allowable width when building a PTE
Otherwise, INVALID_MFN tramples over high order bits used for additional flags.
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
Jan Beulich [Wed, 28 Mar 2012 14:59:02 +0000 (16:59 +0200)]
x86/hpet: warn about and clear reserved set config register bits
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Jan Beulich [Tue, 27 Mar 2012 13:25:07 +0000 (15:25 +0200)]
x86/hpet: use asm/hpet.h in HVM emulation code
Also replace some plain numbers by using suitable defines (to make
clear what they are standing for).
Generated code is identical (apart from line number changes and
functions possibly getting ordered differently).
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Jan Beulich [Tue, 27 Mar 2012 13:23:43 +0000 (15:23 +0200)]
x86/hpet: clear unwanted bits
Leaving certain bits set when being started from an environment where
the HPET was already in use can affect functionality. Clear those bits
to be on the safe side.
We should also consider ignoring the HPET altogether if any reserved
bits are found to be set.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Jan Beulich [Tue, 27 Mar 2012 13:22:54 +0000 (15:22 +0200)]
x86/hpet: replace disabling of legacy broadcast
... by the call to hpet_disable() added in the immediately preceding
patch.
In order to retain the behavior intended by c/s 23776:
0ddb4481f883,
implement one of the alternative options pointed out there: remove CPUs
from the online map in __stop_this_cpu() (and hence doing so in
stop_this_cpu() is no longer needed).
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Jan Beulich [Tue, 27 Mar 2012 13:20:23 +0000 (15:20 +0200)]
x86/hpet: disable before reboot or kexec
Linux up to now is not smart enough to properly clear the HPET when it
boots, which is particularly a problem when a kdump attempt from
running under Xen is being made. Linux itself added code to work around
this to its shutdown paths quite some time ago, so let's do something
similar in Xen: Save the configuration register settings during boot,
and restore them during shutdown. This should cover the majority of
cases where the secondary kernel might not come up because timer
interrupts don't work.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Ian Campbell [Tue, 27 Mar 2012 10:13:58 +0000 (11:13 +0100)]
hcall: markup the grant table hypercalls to improve generated docs
As part of this I looked through the relevant chapter from interfaces.tex (from
4.1, deleted in unstable) to ensure no critical information was missing.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Keir Fraser [Fri, 23 Mar 2012 20:51:48 +0000 (20:51 +0000)]
x86_emulate: Do not push an error code onto a #UD exception stack
Signed-off-by: Keir Fraser <keir@xen.org>
Andrew Cooper [Fri, 23 Mar 2012 20:45:16 +0000 (20:45 +0000)]
x86_emulate: raise #UD rather than #GP on invalid use of LOCK prefix
From: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Keir Fraser <keir@xen.org>
Committed-by: Keir Fraser <keir@xen.org>
Jan Beulich [Fri, 23 Mar 2012 15:13:29 +0000 (16:13 +0100)]
x86/hpet: simplify hpet_get_channel()
There's no need for a lock here, elimination of which makes the
function a leaf one, thus allowing for better (and smaller) code.
Further, use the variable next_channel according to its name - so far
it represented the most recently used channel rather than the next one
to use.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Liu, Jinsong [Fri, 23 Mar 2012 15:08:17 +0000 (15:08 +0000)]
Xen core parking 2: core parking implementation
This patch implement Xen core parking.
Different core parking sequence has different power/performance
result, due to cpu socket/core/thread topology.
This patch provide power-first and performance-first policies, users
can choose core parking policy by their own demand.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Committed-by: Keir Fraser <keir@xen.org>
Liu, Jinsong [Fri, 23 Mar 2012 15:07:53 +0000 (15:07 +0000)]
Xen core parking 1: hypercall
This patch implement hypercall through which dom0 send core parking
request, and get core parking result.
Due to the characteristic of continue_hypercall_on_cpu, dom0
seperately send/get core parking request/result.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Committed-by: Keir Fraser <keir@xen.org>
David Vrabel [Fri, 23 Mar 2012 13:45:28 +0000 (13:45 +0000)]
Fix test for NULL command line in cmdline_parse()
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
Jan Beulich [Fri, 23 Mar 2012 10:46:11 +0000 (11:46 +0100)]
x86/hpet: force_hpet_broadcast can be __initdata
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Jan Beulich [Fri, 23 Mar 2012 07:39:39 +0000 (08:39 +0100)]
x86/gnttab: fix asm() operand in gnttab_clear_flag()
The operand needs to use the 'w' modifier in case the compiler happens
to pick a register (which apparently it does for no-one but the
reporter of this problem).
Reported-by: Lin Ming <mlin@ss.pku.edu.cn>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Tim Deegan [Thu, 22 Mar 2012 17:15:22 +0000 (17:15 +0000)]
Disable OVMF build - it's not baked yet.
Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Keir Fraser <keir@xen.org>
Ian Campbell [Thu, 22 Mar 2012 15:15:20 +0000 (15:15 +0000)]
arm: shorten constant names in head.S to keep within 80 columns
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
David Vrabel [Thu, 22 Mar 2012 14:26:47 +0000 (14:26 +0000)]
Allow cmdline_parse() to be used with const strings
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
David Vrabel [Thu, 22 Mar 2012 14:26:46 +0000 (14:26 +0000)]
arm: remove the hack for loading vmlinux images
Don't adjust the RAM location/size when loading an ELF for dom0. It
was vmlinux specific and no longer needed because Linux can be loaded
from a zImage. Support for loading ELF images is not removed as it
may be useful for loading things other than the Linux kernel.
This also makes preparing the device tree for dom0 easier.
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
David Vrabel [Thu, 22 Mar 2012 14:26:46 +0000 (14:26 +0000)]
device tree: add device_tree_dump() to print a flat device tree
Add a device_tree_dump() function which prints to main structure and
properties names of a flat device tree (but not the properties values
yet).
This will be useful for debugging problems with the device tree
generated for dom0.
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
David Vrabel [Thu, 22 Mar 2012 14:26:45 +0000 (14:26 +0000)]
device tree: add device_tree_for_each_node()
Add device_tree_for_each_node() to iterate over all nodes in a flat
device tree. Use this in device_tree_early_init().
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
David Vrabel [Thu, 22 Mar 2012 14:26:44 +0000 (14:26 +0000)]
device tree: correctly ignore unit-address when matching nodes by name
When matching node by their name, correctly ignore the unit address
(@...) part of the name. Previously, a "memory-controller" node would
be incorrectly matched as a "memory" node.
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
David Vrabel [Thu, 22 Mar 2012 14:26:44 +0000 (14:26 +0000)]
device tree: follow coding style
Only changes to the coding style, no functional changes.
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
David Vrabel [Thu, 22 Mar 2012 14:26:43 +0000 (14:26 +0000)]
MAINTAINERS: add device tree maintainer
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
David Vrabel [Thu, 22 Mar 2012 14:26:42 +0000 (14:26 +0000)]
libfdt: move headers to xen/include/xen/libfdt/
Move the public libfdt headers to xen/include/xen/libfdt/ so CFLAGS
does need to be set to find them. This requires minor tweaks to one
of the headers imported from upstream.
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Thu, 22 Mar 2012 14:26:41 +0000 (14:26 +0000)]
arm: use symbolic constants for initial page table attributes
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Thu, 22 Mar 2012 14:26:41 +0000 (14:26 +0000)]
arm: remove hard tabs
The only hard tabs remaining in xen/arch/arm and xen/include/asm-arm are now
only in .S files and .[ch] imported from Linux
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Keir Fraser [Thu, 22 Mar 2012 12:20:13 +0000 (12:20 +0000)]
Introduce system_state variable.
Use it to replace x86-specific early_boot boolean variable.
Also use it to detect suspend/resume case during cpu offline/online
to avoid unnecessarily breaking vcpu and cpupool affinities.
Signed-off-by: Keir Fraser <keir@xen.org>
Acked-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
Tim Deegan [Thu, 22 Mar 2012 10:26:45 +0000 (10:26 +0000)]
Merge
Attilio Rao [Thu, 22 Mar 2012 10:26:03 +0000 (10:26 +0000)]
Fetch the OVMF repository from specific git mirror and enable it
Signed-off-by: Attilio Rao <attilio.rao@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
David Vrabel [Thu, 22 Mar 2012 10:23:30 +0000 (10:23 +0000)]
docs: improve documentation for the the dom0_mem command line option
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
Andres Lagar-Cavilla [Thu, 22 Mar 2012 10:23:28 +0000 (10:23 +0000)]
x86/mm: fix broken shadow debug printk
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
Tim Deegan [Thu, 22 Mar 2012 10:25:28 +0000 (10:25 +0000)]
x86: Fix put_gfn in XEN_DOMCTL_getpageframeinfo3.
Reported by Christian Limpach.
Signed-off-by: Tim Deegan <tim@xen.org>
David Vrabel [Thu, 22 Mar 2012 10:19:01 +0000 (10:19 +0000)]
kexec: provide crashinfo_maxaddr_bits if !CONFIG_KEXEC
Fix the build where !CONFIG_KEXEC (e.g., arm) by providing a default
crashinfo_maxaddr_bits.
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
David Vrabel [Thu, 22 Mar 2012 10:18:12 +0000 (10:18 +0000)]
CODING_STYLE: Document the coding style conventions.
Based on a version originally posted in 2007.
http://lists.xen.org/archives/html/xen-devel/2007-06/msg00070.html
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
Jan Beulich [Wed, 21 Mar 2012 08:37:24 +0000 (09:37 +0100)]
ia64: fix build (after c/s 25070:
4e1d091d10d8)
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Andrew Cooper [Fri, 16 Mar 2012 15:24:25 +0000 (15:24 +0000)]
kexec: Fix printing of paddr_t in 32bit mode.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>